
<?php

//CONNECTION TO DATABASE//
$var1 = $_GET[id];
$username="user";
$password="password";
$database="database name";

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM sharecategories order by id";
$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();

$i=0;
while ($i < $num) {
	
	
//GETTING RESULTS//
$id=mysql_result($result,$i,"id");
$category=mysql_result($result,$i,"category");
$description=mysql_result($result,$i,"description");
$date=mysql_result($result,$i,"timestamp");


//SHOWING RESULTS//
echo "<b><a href=categoryitem_s40.php?category=$category>&nbsp;&bull; $category</a></b>";
echo "<hr>";
$i++;
}
?>
